fix: use valid JPMS module name for mcp-core #609
+1
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #560
Automatic-Module-Nameinmcp-core/pom.xmlto use a valid JPMS module nameio.modelcontextprotocol.sdk.mcp-core(invalid - contains dash) toio.modelcontextprotocol.sdk.mcp.coreBundle-SymbolicNamekept asio.modelcontextprotocol.sdk.mcp-corefor backward compatibilityProblem
JPMS module names must be valid Java identifiers and cannot contain dashes. The previous automatic module name
io.modelcontextprotocol.sdk.mcp-coreprevented usage in modular Java applications.Solution
Hard-coded the
Automatic-Module-Nametoio.modelcontextprotocol.sdk.mcp.core.Alternative: Could use BND's substitution macro
${subst;${project.groupId}.${project.artifactId};-;.}if dynamic generation is preferred by maintainers.Compatibility
OSGI's
Bundle-SymbolicNameremains unchanged with the dash (mcp-core) as OSGI allows dashes in symbolic names. Having different names for JPMS and OSGI is acceptable and common.Test plan
mcp-coremodule successfullyAutomatic-Module-Name: io.modelcontextprotocol.sdk.mcp.coreBundle-SymbolicNameremainsio.modelcontextprotocol.sdk.mcp-core🤖 Generated with Claude Code